package com.study.jvm.directmemory;

import java.io.IOException;
import java.nio.ByteBuffer;

/**
 * -XX:+DisableExplicitGC 禁用显示的gc调用
 */
public class DirectMemoryGc {
    private static final int _1GB = 1024 * 1024 * 1024;

    public static void main(String[] args) throws IOException {
        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(_1GB);
        System.in.read();
        byteBuffer = null;
        System.gc();
        System.in.read();

    }
}
